Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evervault/sdk

Package Overview
Dependencies
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evervault/sdk

evervault Browser SDK

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

About

The evervault SDK allows developers to integrate with evervault auth and encrypt/decrypt data within their web app. Built on the Web Crypto API.

API Reference

checkAuth

checkAuth(appId): void

Check a user's auth status in the system, and redirect them if they are unauthenticated.

ParamTypeDescription
appIdStringThe unique identifier for your app in the evervault system

encrypt

encrypt(data[, encryptOptions]): Promise<String>

Encrypt data using a user's secret key. The encrypt function will handle any data excluding undefined and Symbol.

ParamTypeDescription
dataanythe data to be encrypted
encryptOptionsobjectcontrol how your data is encrypted

encryptOptions

KeyValueDescription
preserveObjectShapebooleanif true, javascript objects will only have their values encrypted, if false objects will be stringified
fieldsToEncryptArray<String>a list of fields in an object to encrypt
privateKeyStringa base64 representation of a user's evervault secret key

decrypt

decrypt(data[, privateKey]): Promise<String>

Decrypt evervault encrypted data. Decrypt will preserve the shape of any object it's given (e.g. Array or Object). Any stringified data that enters decrypt will be parsable when it has been decrypted.

ParamTypeDescription
dataanythe data to be decrypted, be it an object, array or a string
privateKeyStringa base64 representation of a user's evervault secret key

logout

logout(): void

Remove a user's credentials and redirect them to evervault auth.

refreshAccessToken

refreshAccessToken([accessToken, refreshToken]): Promise<Object>

Refresh a user's access token in the evervault system.

ParamTypeDescription
accessTokenStringa user's evervault access token to authenticate them in your system
refreshTokenStringa user's evervault refresh token to keep them authenticated

FAQs

Package last updated on 27 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc